package org.bot.http.event;

import org.bot.api.event.DataStorage;
import org.bot.api.event.EventName;
import org.bot.api.event.Events;
import org.bot.api.flow.FlowNode;
import org.bot.http.client.HttpTool;
import org.springframework.stereotype.Component;

@Component
@EventName("GET请求（站外）")
public class ClientHttpGet implements Events {

    @Override
    public Object exec(FlowNode note, DataStorage data) {
        return HttpTool.doGet(data.get(note.getDataIndex()).toString());
    }

}
